
<section class="wrapper">
	<!-- page start-->
	<section class="panel">
		<header class="panel-heading"> PAYPAL </header>
		<div class="panel-body">
			<form class="form-horizontal" role="form" name="news" method="POST"
				action="<?= base_url(); ?>secure/payment/paypal/paypal_update">
				<?php
				$this->session->flashdata('message'); {
					$msg = $this->session->flashdata('message');
					echo '<font color="red">' . $msg . '</font>';
				}
				?>
				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Paypal Email</label>
					<div class="col-lg-6">
						<input type="text" class="form-control" id="paypal_user_id" name="paypal_user_id"
							placeholder="Paypal Email" value="<?= $paypal_user;?>">
					</div>
				</div>


				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Currency</label>
					<div class="col-lg-6">
						<input type="text" class="form-control" id="paypal_currency_code" name="paypal_currency_code"
							placeholder="Currency" value="<?= $currency_code;?>">
					</div>
				</div>

				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Paypal Live</label>
					<div class="col-lg-8">
						<input name="paypal_paypal_live" type="radio" value="FALSE" <?php if ($paypal_live == 'FALSE')
                        echo 'checked=cheked' ?>/>Inactive <input name="paypal_paypal_live" type="radio" value="TRUE" <?php if ($paypal_live == 'TRUE')
                        echo 'checked=cheked' ?>/> Active
					</div>
				</div>
				
				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Ipn Log</label>
					<div class="col-lg-8">
						<input name="paypal_ipn_log" type="radio" value="FALSE" <?php if ($ipn_log == 'FALSE')
                        echo 'checked=cheked' ?>/>Inactive <input name="paypal_ipn_log" type="radio" value="TRUE" <?php if ($ipn_log == 'TRUE')
                        echo 'checked=cheked' ?>/> Active
					</div>
				</div>
				<div class="form-group">
					<div class="col-lg-offset-2 col-lg-8">
						<input type="submit" class="btn btn-info pull-right" value="Save Paypal"<?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Not allowed in demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');"  >
					</div>
				</div>


			</form>
		</div>
		<!-- End of Body Panel -->
	</section>
	<section class="panel">
					<header class="panel-heading"> PAYMENTS   </header>
					<div class="panel-body">
						<table class="table table-striped table-advance table-hover">
							<thead>
								<tr>
								
								<th><i class="icon-bullhorn"></i> Payment Date</th>
									<th><i class="icon-bookmark"></i> First Name</th>
									<th class="hidden-phone "><i class="icon-bookmark"></i>
										Last Name</th>
										
										<th class="hidden-phone "><i class="icon-bookmark"></i>
										Payer Email</th>
										
										<th class="hidden-phone "><i class="icon-bookmark"></i>
										Currency Code</th>
										
										<th class="hidden-phone "><i class="icon-bookmark"></i>
										Payment Status</th>
												
									<th><i class=" icon-edit"></i> Action</th>
								</tr>
							</thead>
							<tbody>
							<?php foreach ($payments as $payments) : ?>
								<tr>
									<th><?= $payments->payment_date;?></th>
									<td class="hidden-phone"><?= $payments->first_name;?></td>
									<td class="hidden-phone"><?= $payments->last_name;?></td>
									<td class="hidden-phone"><?= $payments->payer_email;?></td>
									<td class="hidden-phone"><?= $payments->mc_currency;?></td>
									<td class="hidden-phone"><?= $payments->payment_gross;?></td>
									<td>
									
									
										<a href="<?= base_url();?>secure/payment/paypal/viewpayment/<?= $payments->id?>" data-toggle="tooltip" title="Edit" onclick="return confirm('Are you sure you want to View?')">
										<button class="btn btn-primary btn-xs">
											<i class="icon-eye-open"></i>
										</button>
										</a>
										</td>
								</tr>
								<?php endforeach;?>
								
							</tbody>
						</table>
					</div>
					<!-- End of Body Panel -->
				</section>
	
</section>
